#ifndef __PLL_H
#define __PLL_H
#include "stm32g4xx.h"
#include "stdbool.h"

typedef struct{
	float 			kp;									
	float 			ki;
	float				theta;
	float  			err_last;
	float				bandwidth;
	bool				addstop;
}PLL;   

void pll_init(PLL *pll);
float pll_loop(float cos_theta,float sin_theta,PLL *pll);
#endif

